package com.zmn.oms.services.impl.distribute;

import com.zmn.oms.model.entity.distribute.OrderPreDistributeRecord;
import com.zmn.oms.persistence.interfaces.distribute.PreDistributeRecordDao;
import com.zmn.oms.services.interfaces.distribute.PreDistributeRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName DistributeRecordServiceImpl
 * @description:
 * @author: wangyanci
 * @create: 2021-12-17 18:01
 * @Version 1.0
 **/
@Slf4j
@Service
public class PrePreDistributeRecordServiceImpl implements PreDistributeRecordService {

    @Autowired
    private PreDistributeRecordDao distributeRecordDao;

    @Override
    public int insertOrderPreDistributeRecord(OrderPreDistributeRecord orderPreDistributeRecord) {
        return distributeRecordDao.insertOrderPreDistributeRecord(orderPreDistributeRecord);
    }

    @Override
    public OrderPreDistributeRecord findOrderPreDistributeRecordByKey(Long preDistributeId, Long orderId) {
        return distributeRecordDao.findOrderPreDistributeRecordByKey(preDistributeId, orderId);
    }

    @Override
    public List<OrderPreDistributeRecord> findOrderPreDistributeRecordByQuery(OrderPreDistributeRecord distributeRecord) {
        return distributeRecordDao.findOrderPreDistributeRecordByQuery(distributeRecord);
    }
}